{@
	$ds_readed = $ci['readed_count']->display == 'Y';
	$ds_voted = $ci['voted_count']->display == 'Y';

	$ds_update = $ci['last_update']->display == 'Y';
	$ds_updater = $ci['last_updater']->display == 'Y';
	$ds_update && $ds_updater ? $ci['last_update']->display = 'N' : 0;

	$ci['content']->display = 'N';
	$ci['comment']->display = 'N';
	$ci['thumbnail']->display = 'N';
	$ci['tag']->display = 'N';

	$mi->star_style!='N' ? $ci['blamed_count']->display = 'N' : 0;
	$mi->star_style!='N' && $ds_voted ? $ci['readed_count']->display = 'N' : 0;

	$lang->short_readed_count ? $ci['readed_count']->name = $lang->short_readed_count : 0;
	$lang->short_blamed_count ? $ci['blamed_count']->name = $lang->short_blamed_count : 0;
	$lang->short_voted_count ? $ci['voted_count']->name = $lang->short_voted_count : 0;
	$mi->star_style!='N' ? $ci['voted_count']->name = $lang->star_column : 0;

	$colcnt = $sotcnt = 0;
	$sclms = array();

	$is_notice_widget = !$document_srl && $mi->use_notice_widget=='widget';
	$a_lsttp = array('notice'=>&$notice_list,'best'=>&$best_list);
}

<block loop="$ci => $key,$val" cond="$val->display=='Y'">
	{@
		$colcnt += $val->idx<0?1:0;
		$sclms[$key] = $val;
	}
</block>

<!-- LIST -->
<include cond="$is_notice_widget && (count($notice_list) || count($best_list))" target="_etc.noticewidget.html" />

<table id="siLst" class="gall{$mi->display_list_header=='N'?' noheader':''}" width="100%" border="0" cellspacing="0" summary="List of document">
<thead cond="$mi->display_list_header != 'N'" class="scOneCol">
	<tr>
		<th scope="row" colspan="{$colcnt}">
		<div>&nbsp;
			<span loop="$sclms => $key,$val" cond="$val->sort == 'Y'" class="sort"> {@ $sotcnt++}
				<a href="{$oEntry->getUrl('sort_index',$key,'order_type',($order_type!='asc'?'asc':'desc'))}">{$val->name}<em class="asc"|cond="$sort_index==$key&&$order_type=='asc'">&nbsp;</em></a>
			</span>
			<span cond="$mi->display_document_count!='N'&&!$sotcnt" class="scHaDCnts">
				<em>Today</em> <strong>{$oThis->getDocumentCountByDate(date("Ymd"))}</strong>,
				<em>Yesterday</em> <strong>{$oThis->getDocumentCountByDate(date("Ymd",strtotime("-1 day", time())))}</strong>,
				<em>Total</em> <strong>{$total_count}</strong>
			</span>
		</div>
		</th>
		<td cond="$grant->manager" class="scCheck sort"><div><input type="checkbox" onclick="XE.checkboxToggleAll({ doClick:true }); return false;" /></div></td>
	</tr>
</thead>

<block cond="!$is_notice_widget">
	<tbody loop="$a_lsttp => $tlk,$p_list" cond="$tlk && count($p_list)" class="{$tlk}">
		<block loop="$p_list => $no,$document">
		{@
			$is_blind = ($tlk!='notice'&&$mi->use_blind=='Y')?$oThis->isBlind($document->document_srl):0;
			$purl = $oEntry->getUrl('','mid',$mid,'document_srl',$document->document_srl,'sort_index',$sort_index,'order_type',$order_type,'search_target',$search_target,'search_keyword',$search_keyword,'page',$spage);
		}
		<tr data-hottrack="{$purl}"|cond="$us_hottrack">
			<td loop="$sclms => $key,$val" cond="$val->idx<0" scope="col" class="{$key}" style="color:{$val->color}"|cond="$val->color">
				<!--@switch($key)-->
					<!--@case('no')-->
						{@ $no = $tlk?'<img src="img/common/label_'.$tlk.'.gif" alt="'.$tlk.'" />':$no}
						{($document->document_srl==$document_srl)?'<strong class="sCkChr">&radic;</strong>':$no}
					<!--@break-->
					<!--@case('category_srl')-->
						{@ $cate = $is_cts?$cts[$document->get('category_srl')]:0 }
						<a cond="$cate" href="{$oEntry->getUrl('','mid',$mid,'category_srl',$cate->category_srl)}" title="{htmlspecialchars($cate->description)}" style="color:{$cate->color}"|cond="$cate->color">{$cate->title}</a>
						<span cond="!$cate">{$lang->none_category}</span>
					<!--@break-->
					<!--@case('title')-->
						<div class="scElps" data-active="true"|cond="$is_elips">
							<a href="{$purl}">{$is_blind?$lang->msg_is_blind:$document->getTitle($mi->title_length)}</a>
							<span>
								{@
									$t_cmtn = $document->getCommentCount();
									$t_tbkn = $document->getTrackbackCount();
								}
								<em cond="$t_cmtn" class="reply" title="Replies">+{$t_cmtn}</em><em cond="$t_tbkn" class="trackback" title="Trackbacks">.{$t_tbkn}</em>
								<em cond="!$t_cmtn&&!$t_tbkn">&nbsp;</em>
								{$document->printExtraImages(60*60*$mi->duration_new)}<img class="scIcoSet world" src="img/common/blank.gif" alt="multilingual" title="multilingual" cond="$ds_mtlng&&count($un_extra->beluxe->langs)" />
							</span>
						</div>
					<!--@break-->
					<!--@case('nick_name')-->
					<!--@case('user_name')-->
						{@
							$mbsl = $document->get('member_srl');
							$home = $document->get('homepage');
							$nick = cut_str((!$mbsl||$key=='nick_name')?$document->getNickName():$document->getUserName(), $mi->nickname_length);
						}
						<i cond="!$mbsl && !$home">{$nick}</i>
						<span cond="$mbsl" class="scHLink member_{$mbsl}">{$nick}</span>
						<i cond="!$mbsl && $home" class="scHLink" data-href="{$home}">{$nick}</i>
					<!--@break-->
					<!--@case('custom_status')-->
						<span class="custom_status_{(int)$document->get('is_notice')}"|cond="$tlk!='notice'">{$tlk&&$tlk=='notice'?$lang->notice:$cstus[(int)$document->get('is_notice')]}</span>
					<!--@break-->
					<!--@case('voted_count')-->
					<!--@case('blamed_count')-->
						<!--@if($mi->star_style!='N')-->
							{@
								$votedp = (int)$document->get('voted_count');
								$blamedp = (int)$document->get('blamed_count');
								$totalp = $votedp?(($votedp / ($votedp + abs($blamedp)) * 100) * 0.5):0;
							}
							<span cond="$ds_readed" class="scRdStar color{$mi->star_style}" title="{$lang->readed_count}">{$document->get('readed_count')}</span>
							<span class="scVtStar color{$mi->star_style}" title="{$lang->voted_count}: {$votedp.'/'.$blamedp}"><em style="width:{$totalp}px"></em></span>
						<!--@else-->
							{$document->get($key)}
						<!--@endif-->
					<!--@break-->
					<!--@case('regdate')-->
					<!--@case('last_update')-->
						{($key=='regdate')?$document->getRegdate('Y.m.d'):zdate($document->get('last_update'))}
					<!--@break-->
					<!--@case('last_updater')-->
						<!--@if($ds_update && $ds_updater)-->
							<span cond="$document->get('last_updater')" title="{$lang->last_updater}">{zdate($document->get('last_update'),'y-m-d')} : <em>{cut_str($document->get('last_updater'), $mi->nickname_length)}</em></span>
						<!--@else-->
							{cut_str($document->get($key), $mi->nickname_length)}
						<!--@endif-->
					<!--@break-->
					<!--@default-->
						{($ci[$key]->idx > 0)?$document->getExtraValueHTML($ci[$key]->idx):$document->get($key)}
				<!--@endswitch-->
			</td>
			<td cond="$grant->manager" class="scCheck"><input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" checked="checked"|cond="$document->isCarted()" /></td>
		</tr>
		</block>
	</tbody>
</block>
<tbody cond="count($document_list)">
	<tr>
		<td scope="col" colspan="{$colcnt+2}" class="scBox clearBar">
		{@
			$ds_title = $sclms['title'];
			$ds_cate = $sclms['category_srl'];
			$ds_nick = $sclms['nick_name'];
			$ds_user = $sclms['user_name'];
			$ds_regdate = $sclms['regdate'];

			unset($sclms['no']);
			unset($sclms['title']);
			unset($sclms['category_srl']);
			unset($sclms['blamed_count']);
			unset($sclms['nick_name']);
			unset($sclms['user_name']);
			unset($sclms['regdate']);
			unset($sclms['last_update']);
			unset($sclms['last_updater']);
			unset($sclms['readed_count']);
			unset($sclms['voted_count']);
		}
		<block loop="$document_list => $no,$document">
		{@
			$is_grant = $grant->view && (!$document->isSecret() || $document->isGranted());
			$is_blind = $mi->use_blind=='Y'?$oThis->isBlind($document->document_srl):0;
			$purl = $oEntry->getUrl('','mid',$mid,'document_srl',$document->document_srl,'sort_index',$sort_index,'order_type',$order_type,'search_target',$search_target,'search_keyword',$search_keyword,'page',$spage);
			$un_extra = ($is_rtrpt||$ao_ppang||$ds_mtlng)?$document->get('extra_vars'):null;
			$un_extra = is_string($un_extra)?unserialize($un_extra):$un_extra;
		}
			<div class="scItem" <!--@if($us_hottrack)-->data-hottrack="{$purl}" data-type="gall"<!--@endif-->>
				<span cond="$grant->manager" class="scCheck"><input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" checked="checked"|cond="$document->isCarted()" /></span>
				<a href="{$purl}">
					<!--@if($is_blind || !$is_grant)-->
						<img class="thum" src="img/common/thum_{$is_blind?'blind':'secret'}.png" alt="{$is_blind?'blind':'secret'}" title="{$is_blind?'blind':'secret'}" height="{(int)$mi->thumbnail_height}" width="{(int)$mi->thumbnail_width}" />
					<!--@else-->
						<!--@if($document->thumbnailExists($mi->thumbnail_width, $mi->thumbnail_height, $mi->thumbnail_type))-->
							<img class="thum" src="{$document->getThumbnail($mi->thumbnail_width, $mi->thumbnail_height, $mi->thumbnail_type)}" width="{(int)$mi->thumbnail_width}"|cond="$mi->thumbnail_type!='ratio'" border="0" alt="" />
						<!--@else-->
							<img class="thum" src="img/common/thum_no.png" alt="no image" title="no image" height="{(int)$mi->thumbnail_height}" width="{(int)$mi->thumbnail_width}" />
						<!--@endif-->
					<!--@endif-->
					<span class="prtImg">
						{@
							$t_cmtn = $document->getCommentCount();
							$t_tbkn = $document->getTrackbackCount();
						}
						{$document->printExtraImages(60*60*$mi->duration_new)}<img class="scIcoSet world" src="img/common/blank.gif" alt="multilingual" title="multilingual" cond="$ds_mtlng&&count($un_extra->beluxe->langs)" />
						<block cond="$ao_ppang&&$un_extra->ppang&&$un_extra->ppang->d->p>0">
							{@$ao_pppt = sprintf($lang->bonus_pang_pang, $un_extra->ppang->d->p)}
							<img class="scIcoSet coin" src="img/common/blank.gif" title="{$ao_pppt}" alt="{$ao_pppt}" />
						</block>
						<em cond="$t_cmtn || $t_tbkn" class="reply" title="Replies">+{(int)$t_cmtn}<block cond="$t_tbkn">.{$t_tbkn}</block></em>
						<em cond="$is_rtrpt" class="usept" title="Point">{$un_extra->beluxe?abs((int)$un_extra->beluxe->use_point):'0'}</em>
					</span>
					<div <!--@if($mi->display_thumbnail_info != 'N')-->class="scInfo aHide" style="display:none" data-autohide="true"<!--@else-->class="scInfo"<!--@endif--> data-fade="true"|cond="$mi->display_thumbnail_info == 'F'">
						<ul style="width:{(int)$mi->thumbnail_width}px;"|cond="$mi->display_thumbnail_info=='N'||$mi->thumbnail_type!='ratio'">
							<li cond="$mi->display_thumbnail_info != 'N'" class="scNbsp">&nbsp;</li>
							<li cond="$ds_title" class="title">
								<strong>{$is_blind?$lang->msg_is_blind:$document->getTitle($mi->title_length)}</strong>
							</li>
							<li cond="$ds_cate" class="category_srl">
								{@ $cate = $is_cts?$cts[$document->get('category_srl')]:0 }
								<span cond="$cate" title="{htmlspecialchars($cate->description)}" style="color:{$cate->color}"|cond="$cate->color">{$cate->title}</span>
								<span cond="!$cate">{$lang->none_category}</span>
							</li>
							<li cond="$ds_readed" class="readed_count">
								<span>{context::getLang('readed_count')}:</span> <span>{$document->get('readed_count')}</span>
							</li>
							<li cond="$ds_voted" class="voted_count">
								<span>{context::getLang('voted_count')}:</span> <span>{$document->get('voted_count')} / {$document->get('blamed_count')}</span>
							</li>
							<li loop="$sclms => $key,$val" cond="$key" class="{$key}" style="color:{$val->color}"|cond="$val->color">
								<!--@switch($key)-->
									<!--@case('custom_status')-->
										<span>{context::getLang($key)}:</span> <span class="custom_status_{(int)$document->get('is_notice')}">{$cstus[(int)$document->get('is_notice')]}</span>
									<!--@break-->
									<!--@default-->
										<span>{($ci[$key]->idx > 0)?strip_tags($document->getExtraValueHTML($ci[$key]->idx)):$document->get($key)}</span>
								<!--@endswitch-->
							</li>
						</ul>
						<div cond="$ds_nick || $ds_user" class="nick_name">
							{@
								$mbsl = $document->get('member_srl');
								$home = $document->get('homepage');
								$nick = cut_str((!$mbsl||$ds_nick)?$document->getNickName():$document->getUserName(), $mi->nickname_length);
							}
							by <!--@if(!$mbsl)--><i>{$nick}</i><!--@else--><span>{$nick}</span><!--@endif-->
						</div>
					</div>
					<strong cond="$ds_regdate || $ds_update" class="scRibbon {($document->document_srl==$document_srl)?'action':''}"><span class="caption">{$ds_regdate ? $document->getRegdate('M.d') : zdate($document->get('last_update'),'M.d')}</span></strong>
				</a>
			</div></block></td>
	</tr>
</tbody>
<tbody cond="!count($document_list)"><tr><td colspan="{$colcnt+2}">{$lang->no_documents}</td></tr></tbody>
</table>
<!-- /LIST -->
